home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / readal.lqb / readal.lib
Encoding:
Text File  |  1985-08-28  |  1.1 KB  |  39 lines

  1.  
  2. (* These procedures are hereby placed in the Public Domain.
  3.                   L/G Computer Consultants
  4.                          box 190
  5.                    Willingboro, NJ 08046                  *)
  6.  
  7.  
  8. Function ReadCh:Char;    (*   read character only no return needed         *)
  9. var                      (*   NOTE: ADDS 128 TO ORDINAL OF SPECIAL KEYS    *)
  10. c: char;                 (*   eg: F1 (27,59) = 187 so that no special      *)
  11. begin                    (*   testing is required in procedure             *)
  12.   read(kbd,c);
  13.   if (c = #27) and KeyPressed then
  14.     begin
  15.       read(Kbd,c);
  16.       ReadCh:=chr(ord(c)+128);
  17.     end
  18.   else
  19.     ReadCh:=c;
  20. end;
  21.  
  22.  
  23. Function ReadInt:Integer;  (*** reads integers  CR required to end read ***)
  24. var
  25.  c: Integer;
  26. begin
  27.   readln(c);
  28.   ReadInt:=c;
  29. end;
  30.  
  31.  
  32. Function ReadByte:Byte;  (***  used to read byte variables , 0..255  ***)
  33. var                      (***  needs CR to end read                  ***)
  34.  c: Byte;
  35. begin
  36.   readln(c);
  37.   ReadByte:=c;
  38. end;
  39.